package com.qf.controller;

import com.qf.pojo.resVo.BaseResult;
import com.qf.service.QFSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SearchController {

    @Autowired
    QFSearchService searchService;

    @RequestMapping("/search/{keyword}/{page}/{size}/{sort}")
    public BaseResult search(@PathVariable("keyword")String keyword,
                             @PathVariable("page")Integer page,
                             @PathVariable("size")Integer size,
                             @PathVariable("sort")String sort){
        return  searchService.search(keyword,page,size,sort);

    }
}


